<style scoped>
</style>
<template>
  <Card v-bind="$props"/>
</template>

<script>
import Card from "@/components/card/Card.vue";

/**
 * @prop {*}
 */
export default {
  _title_: '项目卡片',
  _tip_: '显示项目的头图，标题，简介，关键词，价格等数据。',
  _css_var_: {
    ...Card._css_var_,
  },
  _head_img_: '',
  _group_: '单元组件',
  components: {Card},
  props:{
    head_img: {
      type: String,
      default: 'https://picsum.photos/200',
      _label_: '头图',
      _tip_: '',
      _required_: true,
      _default_: "get($info,'head_img')",
    },
    title: {
      type: String,
      default: '标题',
      _label_: '标题',
      _tip_: '',
      _required_: true,
      _default_: "get($info,'title')",
    },
    keyword: {
      type: [String,Array],
      _label_: '关键词',
      _tip_: '关键词、标签，多个逗号分隔，为空不显示',
      _default_: "get($info,'keyword')",
    },
    info: {
      type: String,
      _label_: '简介',
      _tip_: '为空不显示',
      _default_: "get($info,'info')",
    },
    price: {
      type: [String,Number],
      _label_: '价格',
      _tip_: '为空不显示',
      _default_: "get($info,'price')",
    },
    sales: {
      type: [String,Number],
      _label_: '销量',
      _tip_: '为空不显示',
      _default_: "concat(get($info,'sales'),get($info,'sales_base'))",
    },
    stock: {
      type: [String,Number],
      _label_: '库存',
      _tip_: '为空不显示',
      _default_: "get($info,'stock')",
    },
    num: {
      type: [String,Number],
      _label_: '数量',
      _tip_: '为空不显示',
      _default_: "get($info,'num')",
    },
    column: {
      type: Boolean,
      _label_: '上下结构',
      _tip_: '是否为头图在上，内容在下的上下结构分布',
    },
    href: {
      type: String,
      _label_: '跳转链接',
      _tip_: '点击后的跳转链接，为空点击后不跳转',
    },
  },
}
</script>